package SHGui;


import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;
public class Combination_Gui extends JPanel {
	public JButton new_state;
	public JTextField textField_newState;
	public JButton date_btn;
	public JComboBox comboBox;
	public JButton date1_btn;
	public JButton btnDel;
	public JButton btnBack;
	public JButton btnChange;
	public JButton send_new_comb;
	public Combination_Gui(){};
	public Combination_Gui(String[]arr) {
		
		JLabel combtext = new JLabel("\u05E7\u05D5\u05DE\u05D1\u05D9\u05E0\u05E6\u05D9\u05D9\u05EA \u05DE\u05E6\u05D1\u05D9\u05DD");
		combtext.setBackground(Color.WHITE);
		
		new_state = new JButton("\u05D4\u05D2\u05D3\u05E8 \u05DE\u05E6\u05D1 \u05D7\u05D3\u05E9");
		/*new_state.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});*/
		new_state.setBackground(Color.LIGHT_GRAY);
		
		textField_newState = new JTextField();
		textField_newState.setColumns(10);
		
		JLabel lblNewLabel = new JLabel("\u05E9\u05DD \u05D4\u05DE\u05E6\u05D1 \u05D4\u05D7\u05D3\u05E9:");
		
		JLabel lblNewLabel_1 = new JLabel("\u05EA\u05D0\u05E8\u05D9\u05DB\u05D9 \u05D4\u05EA\u05D7\u05DC\u05D4 \u05D5\u05E1\u05D9\u05D5\u05DD \u05E9\u05DC \u05D4\u05DE\u05E6\u05D1 \u05D4\u05D7\u05D3\u05E9:");
		
		date_btn = new JButton("\u05D1\u05D7\u05E8 \u05EA\u05D0\u05E8\u05D9\u05DB\u05D9\u05DD");
		
		JLabel lblNewLabel_2 = new JLabel("*  \u05DC\u05D0 \u05D7\u05D5\u05D1\u05D4");
		lblNewLabel_2.setFont(new Font("SimSun", Font.PLAIN, 9));
		lblNewLabel_2.setForeground(Color.RED);
		
		JLabel lblNewLabel_3 = new JLabel("* \u05DC\u05D0 \u05D7\u05D5\u05D1\u05D4:");
		//lblNewLabel_3.setForeground(Color.RED);
		lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 10));
		
		JLabel lblNewLabel_4 = new JLabel("\u05D4\u05E4\u05E2\u05DC\\\u05E9\u05E0\u05D4\\\u05DE\u05D7\u05E7 \u05D0\u05EA \u05D4\u05D4\u05E4\u05E2\u05DC\u05D4 \u05E9\u05DC \u05DE\u05E6\u05D1 \u05E7\u05D9\u05D9\u05DD:");
		
		JLabel lblNewLabel_5 = new JLabel("\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05DE\u05E6\u05D1\u05D9\u05DD:");
		
		comboBox = new JComboBox();
		for (int i=1;i<arr.length;i+=2){
	    String ch=arr[i];
		comboBox.addItem(ch);
		}
		date1_btn = new JButton("\u05EA\u05D0\u05E8\u05D9\u05DA \u05D4\u05E4\u05E2\u05DC\u05D4");
		
		btnDel = new JButton("\u05DE\u05D7\u05E7 \u05DE\u05E6\u05D1");
		
		btnBack = new JButton("\u05D7\u05D6\u05D5\u05E8");
		
		btnChange = new JButton("\u05E9\u05E0\u05D4");
		
		send_new_comb = new JButton("\u05E9\u05DC\u05D7 \u05DE\u05E6\u05D1 \u05D7\u05D3\u05E9");
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.TRAILING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(43)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING, false)
						.addComponent(date_btn, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
						.addComponent(new_state, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
					.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(38)
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
								.addComponent(combtext, GroupLayout.PREFERRED_SIZE, 110, GroupLayout.PREFERRED_SIZE)
								.addComponent(lblNewLabel_2))
							.addContainerGap(144, Short.MAX_VALUE))
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(81)
							.addComponent(textField_newState, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
							.addPreferredGap(ComponentPlacement.RELATED)
							.addComponent(lblNewLabel)
							.addGap(48))))
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap(395, Short.MAX_VALUE)
					.addComponent(lblNewLabel_3)
					.addGap(20))
				.addGroup(groupLayout.createSequentialGroup()
					.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
						.addGroup(groupLayout.createSequentialGroup()
							.addContainerGap()
							.addComponent(lblNewLabel_4))
						.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
							.addGroup(groupLayout.createSequentialGroup()
								.addContainerGap(363, Short.MAX_VALUE)
								.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
									.addComponent(comboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
									.addComponent(lblNewLabel_5)))
							.addGroup(groupLayout.createSequentialGroup()
								.addGap(29)
								.addComponent(btnChange)
								.addPreferredGap(ComponentPlacement.RELATED)
								.addComponent(date1_btn)
								.addPreferredGap(ComponentPlacement.RELATED)
								.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
									.addComponent(lblNewLabel_1)
									.addGroup(groupLayout.createSequentialGroup()
										.addComponent(btnDel)
										.addPreferredGap(ComponentPlacement.RELATED, 111, Short.MAX_VALUE)
										.addComponent(btnBack))))))
					.addGap(20))
				.addGroup(Alignment.LEADING, groupLayout.createSequentialGroup()
					.addGap(20)
					.addComponent(send_new_comb)
					.addContainerGap(359, Short.MAX_VALUE))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(22)
					.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(lblNewLabel_3)
							.addPreferredGap(ComponentPlacement.RELATED)
							.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
								.addComponent(lblNewLabel)
								.addComponent(textField_newState, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
							.addPreferredGap(ComponentPlacement.UNRELATED)
							.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
								.addComponent(lblNewLabel_2)
								.addComponent(lblNewLabel_1)))
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(date_btn)
							.addGap(6)))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(new_state)
					.addGap(10)
					.addComponent(lblNewLabel_4)
					.addGap(30)
					.addComponent(lblNewLabel_5)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(comboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(ComponentPlacement.RELATED, 27, Short.MAX_VALUE)
					.addComponent(send_new_comb)
					.addGap(18)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(btnBack)
						.addComponent(btnDel)
						.addComponent(date1_btn)
						.addComponent(btnChange)))
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap()
					.addComponent(combtext)
					.addContainerGap(275, Short.MAX_VALUE))
		);
		setLayout(groupLayout);
	
	}
	}
